import axios from 'axios'

const request=axios.create({
    timeout:6000
})
// 请求拦截
request.interceptors.request.use()
request.interceptors.response.use(
    response=>{
        return response.data
    }
)

export default class Request{
    protected BaseUrl:string="http://39.103.183.108/"

    public get(url:string):Promise<any>{
        return request.get(this.BaseUrl+url)
    }

    public post(url:string,data:any):Promise<any>{
        return request.post(this.BaseUrl+url,data)
    }
}